]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
croco: Remove set-but-unused variables
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 19 Mar 2026 21:41:13 +0000 (22:41 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 19 Mar 2026 21:52:51 +0000 (22:52 +0100)
Theses variables are set, but never read. That's not very useful,
and gcc now warns about them by default (-Wunused-but-set-variable).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4141>

src/st/croco/cr-input.c
src/st/croco/cr-parser.c

index 430e75ed8d0bbb471f92a48805784016cdb74b9c..170d8d971667b557eeee1bb3be159a6218f61c63 100644 (file)
@@ -200,8 +200,7 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc)
         FILE *file_ptr = NULL;
         guchar tmp_buf[CR_INPUT_MEM_CHUNK_SIZE] = { 0 };
         gulong nb_read = 0,
-                len = 0,
-                buf_size = 0;
+                len = 0;
         gboolean loop = TRUE;
         guchar *buf = NULL;
 
@@ -243,7 +242,6 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc)
                         buf = g_realloc (buf, len + CR_INPUT_MEM_CHUNK_SIZE);
                         memcpy (buf + len, tmp_buf, nb_read);
                         len += nb_read;
-                        buf_size += CR_INPUT_MEM_CHUNK_SIZE;
                 }
         }
 
index d4f40cf1deb451285245bd7d7607147bc4207c0a..3f1b36c9a27b9c1adc98c4a435d05a885f999352 100644 (file)
@@ -3028,7 +3028,6 @@ cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr)
         CRTerm *expr = NULL,
                 *expr2 = NULL;
         guchar next_byte = 0;
-        gulong nb_terms = 0;
 
         g_return_val_if_fail (a_this && PRIVATE (a_this)
                               && a_expr, CR_BAD_PARAM_ERROR);
@@ -3046,12 +3045,6 @@ cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr)
                                              1, &next_byte);
                 if (status != CR_OK) {
                         if (status == CR_END_OF_INPUT_ERROR) {
-                                /*
-                                   if (!nb_terms)
-                                   {
-                                   goto error ;
-                                   }
-                                 */
                                 status = CR_OK;
                                 break;
                         } else {
@@ -3086,7 +3079,6 @@ cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr)
                 expr = cr_term_append_term (expr, expr2);
                 expr2 = NULL;
                 operator = 0;
-                nb_terms++;
         }
 
         if (status == CR_OK) {